<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="application/javascript" src="js/testFirstJs.js"></script>
</head>
<body>
<p>
    JavaScript 能够直接写入Html
</p>
<script>
    document.write("<h1> This is a heading</h1>");
    document.write("<p> This is a paragraph</p>");
</script>
<p>
    您只能在html输出流中使用<strong>document.write</strong>.
    <button type="button" onclick="alert('测试哦')">点击这里</button>
</p>
<p id="demo">
    js能够改变html中的内容
</p>
<p id="myDiv">
    A Div
    </p>
<p id="my_var">
    这是一个测试my_var
</p>

<button type="button" onclick="testInner()">点击一下测试</button>
<button type="button" onclick="testVar()">测试一下</button>

</body>
</html>